<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>确认订单</title>
		<link rel="stylesheet" href="__ADMIN__/static/index/css/common.css" />
		<link rel="stylesheet" href="__ADMIN__/static/index/css/confirm_order.css" />
		<script type="text/javascript" src="__ADMIN__/static/index/js/jquery.min.js"></script>
		<script type="text/javascript" src="__ADMIN__/static/index/js/common.js"></script>
		<style>
			.middle>.box>.summation .sub:hover{

				cursor: pointer;
			
			}
			.middle>.box>.summation>div>.sum{

				
			
				margin-right: 21px !important;
			
				margin-top: 10px;
			
			}
			.middle>.box>.summation>div>.sum>.sum_price{

				color: #c8000b;
			
				font-size: 18px;
			
				font-family: "microsoft yahei";
			
			}
		</style>
	</head>

	<body>
		<!--头部-->
			{include file='public/_header' /}
			<!--logo&搜索栏-->
			{include file='public/_search' /}
			<!--nav-->
			{include file='public/_nav' /}
		<!--内容-->
		<div class="middle" style="overflow: hidden;">
			<div class="box" style="overflow: hidden;">
				<ul class="address">
					{volist name='address' id='vo'}
						<li>
							<span style="display: none;" id="detail_id" detail_id='{:$vo['id']}'></span>
							<p>{:$vo.region_name}{:$vo.region_details}</p>
							<span class="name">{:$userinfo.nickname}</span>
							<span class="phone">{:$vo.phone}</span><br />
							<span class="del"><a href="javascript:void(0)" onclick="del(this)">删除</a></span>
							<span class="edit"><a href="javascript:void(0)" onclick="edit(this)">编辑</a></span>
						</li>
					{/volist}
					
					<li>
						<span class="del"><a href="javascript:void(0)">新建地址</a></span>
					</li>
				</ul>
				<h5>确认订单信息</h5>
				<div class="title">
					<span class="pro_info">商品信息</span>
					<span class="count">数量</span>
					<span class="unit">单价</span>
					<span class="discount">优惠方式</span>
					<span class="total">小计</span>
				</div>
				<ol class="order_info">

						<li>
							<span style="display: none;" id="buy_id" buy_id='{:$buy_id}'></span>
							<span style="display: none;" id="buy_style" buy_style='{:$style_id}'></span>
							<span class="pro_img"><a href="pro_details.html"><img style="display: block;width: 191px;height: 125px;" src="__ADMIN__{:$buy_good.goods_thumb}" /></a></span>
							<h5><a href="pro_details.html">{:$buy_good.goods_summary}</a></h5>
							<span class="color_sort">颜色分类 {:$buy_good.goods_color}</span>
							<span class="count" id="buy_num">{:$buy_num}</span>
							<span class="unit">{:$buy_good.goods_price}</span>
							<span class="discount">{:$buy_good.discount}</span>
							<span class="total">{:$buy_good.goods_price}</span>
							<div>
								<span class="trans_method">运输方式：普通运输</span>
								<span class="unit">10</span>
								<span class="total">10</span>
							</div>
						</li>

				</ol>
				
				<div class="summation" style="overflow: hidden;">
					<div style="overflow: hidden;">
						<span class="sum" style="float: right;">合计 <span class="sum_price" id="totalprice">￥{:$price+10}</span></span>
					</div>
					<button style=" width: 200px;height: 60px;border: 0;background-color: #c8000b;color: #FFFFFF;font-family: 'microsoft yahei';float: right;margin-top: 20px;" type="submit" class="sub" id="submitorder" >提交订单</button>
				</div>
				<script>
					$('#submitorder').click(function(){
//						alert(111);return false;
						var buy_num = $('#buy_num').text();
						var buy_id = $('#buy_id').attr('buy_id');
						var detail_id = $('#detail_id').attr('detail_id');
						var buy_style = $('#buy_style').attr('buy_style');
						var totalprice = $('#totalprice').text();
//						alert(detail_id);return false;
						$.post('{:url("index/pay/buy")}',
							{buy_id:buy_id,buy_style:buy_style,buy_num:buy_num,totalprice:totalprice,detail_id:detail_id,totalprice:totalprice},
							function(data){
//								console.log(data);return false;
								if(data>0)
								{
									window.location = '{:url("index/pay/pay")}?orderid='+data
								}
							}
						)
						return false;
					})
				</script>		
			</div>
		</div>
		<!--尾部-->
		{include file='public/_foot' /}
		<script type="text/javascript" src="__ADMIN__/static/index/js/comfirm_order.js" ></script>
	</body>

</html>